"use strict";

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
     */
    const data = [
      {
        name: "红烧肉",
        dishTypeId: 1,
        description: "红烧肉红烧肉红烧肉红烧肉红烧肉红烧肉",
        imageUrl: "https://strapi.zhoutao.host/uploads/pic1_aa0ec0bb3e.jpeg",
        score: 0,
        scoreCount: 0,
        createdAt: new Date(),
        updatedAt: new Date(),
      },
      {
        name: "青椒肉丝",
        dishTypeId: 2,
        description: "青椒肉丝青椒肉丝青椒肉丝青椒肉丝青椒肉丝青椒肉丝",
        imageUrl: "https://strapi.zhoutao.host/uploads/pic1_aa0ec0bb3e.jpeg",
        score: 0,
        scoreCount: 0,
        createdAt: new Date(),
        updatedAt: new Date(),
      },
      {
        name: "炒青菜",
        dishTypeId: 3,
        description: "炒青菜炒青菜炒青菜炒青菜炒青菜炒青菜炒青菜炒青菜",
        imageUrl: "https://strapi.zhoutao.host/uploads/pic1_aa0ec0bb3e.jpeg",
        score: 0,
        scoreCount: 0,
        createdAt: new Date(),
        updatedAt: new Date(),
      },
      {
        name: "西红柿蛋汤",
        dishTypeId: 4,
        description: "西红柿蛋汤西红柿蛋汤西红柿蛋汤西红柿蛋汤",
        imageUrl: "https://strapi.zhoutao.host/uploads/pic1_aa0ec0bb3e.jpeg",
        score: 0,
        scoreCount: 0,
        createdAt: new Date(),
        updatedAt: new Date(),
      },
    ];

    await queryInterface.bulkInsert("Dishes", data, {});
  },

  async down(queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */

    await queryInterface.bulkDelete("Dishes", null, {});
  },
};
